package com.cskaoyan.controller;

import com.cskaoyan.bean.vo.BaseRespVo;
import com.cskaoyan.bean.vo.WXCatalogCurrentVO;
import com.cskaoyan.bean.vo.WXCatalogVO;
import com.cskaoyan.service.WXCatalogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/wx/catalog")
@RestController
public class WXCatalogController {

    @Autowired
    WXCatalogService wxCatalogService;

    @RequestMapping("/index")
    public BaseRespVo index() {
        WXCatalogVO wxCatalogVO = wxCatalogService.index( );
        return BaseRespVo.success(wxCatalogVO);
    }

    @RequestMapping("/current")
    public BaseRespVo current(Integer id) {
        WXCatalogCurrentVO wxCatalogCurrentVO = wxCatalogService.current(id);
        return BaseRespVo.success(wxCatalogCurrentVO);

    }
}
